﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ApiTemplateGenerate.TemplateJsAxios
{
    /// <summary>
    /// TS 接口模版
    /// </summary>
    public class TemplateInterface
    {
        public static string Template = @"
@if(!string.IsNullOrEmpty(@Model.ClassDescribe)){
<text>/** @Model.ClassDescribe */;</text>
}else{}
export interface @Model.ClassName {
    @foreach (var item in Model.ModelPropertyDescribes){ 
if(!string.IsNullOrEmpty(@item.PropertyDescribe)){
  <text>  /** @item.PropertyDescribe</text><text> */;</text>
}else{}
  <text>  @item.PropertyName</text><text>@if(@item.IsNull){@('?')}else{}@(':') @item.PropertyType;</text>
    }
}
";
    }
}
